local thbattle__rinnosuke_qinqu = fk.CreateSkill {

  name = "thbattle__rinnosuke_qinqu",

  tags = {  },

}



thbattle__rinnosuke_qinqu:addEffect("active", {
  anim_type = "support",
  prompt = "#thbattle__rinnosuke_qinqu-active",
  max_phase_use_time = 1,
  card_filter =function (self, player, to_select, selected)
     return #selected < 2 and Fk:currentRoom():getCardArea(to_select) == Player.Hand
        and not player:prohibitDiscard(Fk:getCardById(to_select))
  end,
  target_filter =function (self, player, to_select, selected, selected_cards, card, extra_data)
       local target = to_select
    return target:isWounded() and #selected < 1 and to_select ~= player
  end,
  target_num = 1,
  card_num = 2,
  on_use = function(self, room, effect)
    local from = effect.from
    local target = effect.tos[1]
    room:throwCard(effect.cards, thbattle__rinnosuke_qinqu.name, from, from)
    if target:isAlive() and target:isWounded() then
      room:recover({
        who = target,
        num = 1,
        recoverBy = from,
        skillName = thbattle__rinnosuke_qinqu.name
      })
    end
    if from:isAlive() and from:isWounded() then
      room:recover({
        who = from,
        num = 1,
        recoverBy = from,
        skillName = thbattle__rinnosuke_qinqu.name
      })
    end
  end
})

return thbattle__rinnosuke_qinqu